package com.xy.sqldoc.service;

import com.xy.sqldoc.enums.ExportType;
import org.springframework.beans.factory.annotation.Value;

import javax.annotation.PostConstruct;

import static com.xy.sqldoc.common.Constants.EXPORT_SERVICE_MAP;

public abstract class AbstractExportService implements IExportService {

    @Value("${doc.output-path}")
    protected String outputPath;

    @PostConstruct
    public void init() {
        EXPORT_SERVICE_MAP.put(getExportType(), this);
    }

    abstract public ExportType getExportType();

}
